package br.com.canvasForAll.model.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name="QUADRANTE")
@NamedQueries(value = {
		@NamedQuery(name = "Quadrante.pesquisa", query = "SELECT q FROM Quadrante q"),
		@NamedQuery(name = "Quadrante.duplicata", query = "SELECT COUNT(q) FROM Quadrante q WHERE lower(q.titulo) = lower(:titulo)")
})
public class Quadrante implements Serializable {

	private static final long serialVersionUID = -6052139832189884921L;

	@Id
	@Column(name="ID_QUADRANTE", unique = true, nullable = false)
	private Long id;
	
	@Column(name = "TITULO_QUADRANTE", nullable = false, length = 150)
	private String titulo;
	
	@Column(name = "DESCRICAO_QUADRANTE", length = 255)
	private String descricao;
	
	@Column(name = "ICONE", columnDefinition = "TEXT")
	private String icone;
	
	//GETTERS AND SETTERS
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitulo() {
		return titulo;
	}

	public void setTitulo(String titulo) {
		this.titulo = titulo;
	}

	public String getDescricao() {
		return descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	public String getIcone() {
		return icone;
	}

	public void setIcone(String icone) {
		this.icone = icone;
	}
	
}
